package space.sakana.edusysback.result;

public class Result {

    public static final Result successResult = new Result();
    public static final Result failResult = new Result(false, "fail", 200);

    private boolean success = true;
    private String message = "ok";
    private int code = 200;

    public Result(boolean success, String message, int code) {
        this.success = success;
        this.message = message;
        this.code = code;
    }

    public Result(int code) {
        this.code = code;
    }

    public Result(){

    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
